package com.zgh.util;//package com.zgh.util;
//
//import com.f2bpm.base.core.utils.Guid;
//import com.f2bpm.base.core.utils.string.StringUtil;
//import com.f2bpm.base.core.utils.time.DateUtil;
//import com.f2bpm.process.engine.api.model.WorkflowInfo;
//import com.xxg.base.module.Operater;
//import com.zgh.tysp.util.ProcessConstant;
//import com.alibaba.fastjson.JSONObject;
//
//public class ProcessUtil {
//
//    //生成业务键
//    public static String createBusinessKey(){
//        return ProcessConstant.BK_PREFIX + DateUtil.getCurrentDateTime(ProcessConstant.BK_TIME_SUFFIX);
//    }
//
//    //生成wiid 实例id
//    public static String createWorkflowInstanceId(){
//        return Guid.getGuid();
//    }
//
//
//    public static String getProcessInterfaceDefaultTitle(WorkflowInfo workflowInfo, Operater operater) {
//        return getProcessInterfaceDefaultTitle(workflowInfo,operater.getFullName());
//    }
//
//    //获取工单标题
//    public static String getProcessInterfaceDefaultTitle(WorkflowInfo workflowInfo, String name) {
//        if (workflowInfo==null || StringUtil.isNullOrWhiteSpace(workflowInfo.getTitleTemplate())) {
//            return ProcessConstant.NULL;
//        } else {
//            String resultTitle = workflowInfo.getTitleTemplate();
//            resultTitle = resultTitle.replace(ProcessConstant.TITLE_CURRENTUSERREALNAME, name).replace(ProcessConstant.TITLE_WORKFLOWNAME, workflowInfo.getAppName()).replace(ProcessConstant.TITLE_DATE_VAR, DateUtil.getCurrentDateTime(ProcessConstant.TITLE_TIME_FORMAT));
//            return resultTitle;
//        }
//    }
//
//
//    public static String checkIsEmpty(String[] array ,String requestParam){
//        JSONObject json = JSONObject.parseObject(requestParam);
//        //遍历是否为空
//        for (String key : array) {
//            if(json.getString(key).isEmpty()){
//                return key;//返回为空的key
//            }
//        }
//        return ProcessConstant.SUCCESS;
//    }
//
//
//    public static String getStackTraceInfo() {
//        StackTraceElement[] es = Thread.currentThread().getStackTrace();
//        if(es.length <= 2)
//            return "";
//
//        String[] strs = new String[es.length - 2];
//        for (int i = 0; i < strs.length; i++) {
//            StackTraceElement ei = es[es.length - i - 1];
//            strs[i] = String.format("%s.%s:%d", ei.getClassName(), ei.getMethodName(), ei.getLineNumber());
//        }
//
//        return String.join("->", strs);
//    }
//
//}
